<?php
/*======================================================================*\
|| #################################################################### ||
|| # Package - YJ JBootstrap                							||
|| # Copyright (C) since 2007  Youjoomla LLC. All Rights Reserved.      ||
|| # license - PHP files are licensed under  GNU/GPL V2                 ||
|| # license - CSS  - JS - IMAGE files  are Copyrighted material        ||
|| # bound by Proprietary License of Youjoomla LLC                      ||
|| # for more information visit http://www.youjoomla.com/license.html   ||
|| # Redistribution and  modification of this software                  ||
|| # is bounded by its licenses                                         ||
|| # websites - http://www.youjoomla.com | http://www.yjsimplegrid.com  ||
|| #################################################################### ||
\*======================================================================*/

// no direct access 
if((int)JVERSION == 3){
	defined('JPATH_PLATFORM') or die;
}else{
	defined('_JEXEC') or die ('Restricted access');
}

class plgSystemJBootstrapInstallerScript{
 
    public function postflight($type, $parent){
		if(!JPluginHelper::getPlugin('system', 'JBootstrap') && JFile::exists(JPATH_SITE.DS.'plugins'.DS.'system'.DS.'JBootstrap'.DS.'JBootstrap.php')){
			$db = & JFactory::getDBO();
			$query = "UPDATE #__extensions SET enabled='1' WHERE element='JBootstrap'";
			$db->setQuery($query);
			$db->query();
		}
    }
}